home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 3
/
QRZ Ham Radio Callsign Database - Volume 3.iso
/
world
/
mac
/
digital
/
pktmacse.hqx
/
Pkt Macs
/
PktMacs update doc (text)
< prev
next >
Wrap
Text File
|
1991-04-10
|
4KB
|
104 lines
Programmer╒s Documentation for PktMacs Update Button
The update button I have written for the PktMacs stack is designed to make
updating the stack easy and efficient for the end user. The button will
read a text file containing the update information and incorporate it into
the user╒s stack. The ability to distribute a file that allows the user to
update his stack should eliminate the need to distribute a whole new stack
every time the contents of the stack changes. Another advantage of
distributing changes in a text file is that the user can easily see what
information is being changed.
Syntax of the Update File
At the beginning of the file there can be an arbitrary number lines beginning
with ╥#╙. These lines can be used as comment lines. This would be a good
place to put the date of the update and other useful comments.
After the comment lines the first line must of the form:
The current number of people should be <number of entries>.
where <number of entries> is the number of people in the last version of the
stack. If this line is not found at the beginning of the update file, the
user will see the message ╥The file is incomplete. Obtain another copy.╙ If
the number of entries in the user╒s stack does not match the number of entries
that the file says should exist, the user will see the message ╥You have
missed an update,╙ and the user will be asked if he wants to proceed.
The remaining lines of the update file describe the changes that need to be
made to the stack. Three types of changes are possible: add a new card,
delete a card, and change a card.
The type of operation is indicated by a line of the form:
operation: {add | delete | change} <call sign>
The <call sign> parameter is not used when an card is added.
When an card is added or changed, the lines following the ╥operation╙ line
specify what information should be put into a person╒s card. The format of
the information lines is:
<field name>:<info line 1>
<optional additional info lines>
The valid field names used in the stack are: ╥callsign╙, ╥home╙, ╥first╙ (for
the first name), ╥last╙ (for the last name), ╥address╙, ╥city╙, ╥state╙,
╥zip╙, ╥comments╙, and ╥phone╙. Additional lines of information can follow
the first line for a field. For the comments field all of the lines of
information are formed into a line of text without carriage returns.
Example
Assume that the PktMacs stack contained information for 66 people, that we
wanted to add one person, delete one person, and change the call sign of
a third person. An update file that would accomplish this is:
#
# This file contains updates for the PktMacs stack from 8/1/88 to 9/1/88
# To incorporate this information into your stack, click the UPDATE button
# in the stack and open this file. Do not change the contents of this file. Any
# modifications may prevent the button from using the information.
The current number of people should be 66.
operation: add
callsign:wd8puh
first:Steve
last:Fine
address:504 Linden Rd.
Eastview Terrace
City:State College
State:PA
zip:16801
comments:Steve wrote the script used to update the PktMacs stack from a text
file. He also sells a packet program for the Mac.
operation:delete w3xxx
operation:change wd8c
callsign:w8c
Note that in this example WD8PUH╒s address and comments both span two lines.
The address will be put in the stack as two lines while the RETURN in the
middle of the comments will be replaced by a space.
Limitations
This updating process assumes that everyone has a call sign.
Fields that have multiple word names in Hypercard are handled by special code
in the script. If another multi-word field name is added, the script must be
changed.
The script calls the FileName XFCN written by Steve Maller of Apple Computer.
This XFCN must be in the stack or somewhere in the user╒s Hypercard hierarchy.
No extra spaces should follow colons in update file lines that contain
information for the stack.
Steve Fine, WD8PUH
504 Linden Rd.
State College, PA 16801
September 17, 1988